package com.stj.service;
import com.stj.dao.AdminBlogDao;
import com.stj.entity.Blog;
import com.stj.entity.Link;
import com.stj.entity.blogType;

import java.util.List;

public class AdminBlogService {

    AdminBlogDao dao =new AdminBlogDao();
    public List getBlogAndBlogTypeList() {return  dao.getBlogAndBlogTypeList();}

    public int deleteBlog(int id) {return  dao.deleteBlog(id); }


    public Blog updateBlogFirst(int id) {return  dao.updateBlogFirst(id); }

    public int updateBlog(Blog blog) {return  dao.updateBlog(blog);}

    public List getAllBlogType(){ return  dao.findBlogType();}

    public List selectCommentByState(int state) {return  dao.selectCommentByState(state);}

    public int setCommentStateOne(List<Integer> del_ids) {return dao.setCommentStateOne(del_ids);}

    public int setCommentStateTwo(List<Integer> del_ids) { return dao.setCommentStateTwo(del_ids);}

    public int deleteCommentByIds(List<Integer> del_ids) {return dao.deleteCommentByIds(del_ids);}

    public List<Link> selectAllLink() { return  dao.selectAllLink();}

    public int updateBlogPassword(String userName, String newPassword) { return   dao.updateBlogPassword(userName,newPassword);}

    public int addBlogType(String typeName, int orderNo) {return dao.addBlogType(typeName,orderNo);}

    public int updateBlogTypeById(blogType blogType) {return dao.updateBlogTypeById(blogType);}

    public int deleteBlogTypeByIds(List<Integer> ids) {
        return  dao.deleteBlogTypeByIds(ids);
    }
}
